package com.mr.cai.main.view;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.mr.cai.main.R;
import com.mr.cai.main.utils.CommonCoreUtil;

import rx.functions.Action1;


/**
 * Created by Administrator on 2015/10/12.
 */
public class LoginThirdCountPopup extends BasePopupWindow {
    public LoginThirdCountPopup (Context mContext) {
        super(mContext);
    }

    @Override
    protected void initView(Context mContext) {
        View view=View.inflate(mContext, R.layout.login_with_third_count_layout,null);
        this.pop.setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
        this.pop.setContentView(view);
        ((ImageView)view.findViewById(R.id.weixin_layout).findViewById(R.id.login_iv))
                .setBackgroundResource(R.drawable.weixin_bg);
        ((TextView)view.findViewById(R.id.weixin_layout).findViewById(R.id.login_tv)).setText(R
                .string.weixin_login_txt);;
        CommonCoreUtil.setClickAction(view.findViewById(R.id.weixin_layout), new Action1() {
            @Override
            public void call (Object o) {
                dismiss();
            }
        });

        ((ImageView)view.findViewById(R.id.sina_layout).findViewById(R.id.login_iv))
                .setBackgroundResource(R.drawable.sina_bg);
        ((TextView)view.findViewById(R.id.weixin_layout).findViewById(R.id.login_tv)).setText(R
                .string.sina_login_txt);
        CommonCoreUtil.setClickAction(view.findViewById(R.id.sina_layout), new Action1() {
            @Override
            public void call (Object o) {
                dismiss();
            }
        });

        ((ImageView)view.findViewById(R.id.tencent_layout).findViewById(R.id.login_iv))
                .setBackgroundResource(R.drawable.tencent_bg);
        ((TextView)view.findViewById(R.id.tencent_layout).findViewById(R.id.login_tv)).setText(R
                .string.tencent_login_txt);;
        CommonCoreUtil.setClickAction(view.findViewById(R.id.tencent_layout), new Action1() {
            @Override
            public void call (Object o) {
                dismiss();
            }
        });
    }

    @Override
    public void loadingData() {

    }

    @Override
    protected void destoryData() {

    }

    @Override
    public void onClick (View view) {

    }
}
